import request from '@/utils/request'

// 查询用户动态评论列表
export function listComment(query) {
  return request({
    url: '/system/comment/list',
    method: 'get',
    params: query
  })
}

// 查询用户动态评论详细
// export function getComment(commentId) {
//   return request({
//     // url: '/system/comment/' + commentId,
//     method: 'get'
//   })
// }
//http://192.168.0.100:8082/manage/system/dynamicComment/findDynamicId/1
export function getComment(query) {
  return request({
    url: '/system/dynamicComment/findDynamicId/'+query.dynamicId,
    method: 'get',
    params: query
  })
}

// 新增用户动态评论
export function addComment(data) {
  return request({
    url: '/system/comment',
    method: 'post',
    data: data
  })
}

// 修改用户动态评论
export function updateComment(data) {
  return request({
    url: '/system/comment',
    method: 'put',
    data: data
  })
}

// 删除用户动态评论
export function delComment(commentId) {
  return request({
    url: '/system/comment/' + commentId,
    method: 'delete'
  })
}

// 导出用户动态评论
export function exportComment(query) {
  return request({
    url: '/system/comment/export',
    method: 'get',
    params: query
  })
}
